-- GENERATED SPELL FOR [Mage Hunter Ascendant] --


function spell0_26727(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(34933,pUnit)
pUnit:RegisterEvent('Sorts_26727', 653, 1)
end

function spell1_26727(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(56825,pUnit)
pUnit:RegisterEvent('Sorts_26727', 586, 1)
end

function spell2_26727(pUnit, Event) --@Arcane Trap,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(47789,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_26727', 1, 1)
end

function spell3_26727(pUnit, Event) --@Aura of Arcane Haste,Self--
pUnit:FullCastSpellOnTarget(50182,pUnit)
pUnit:RegisterEvent('Sorts_26727', 0, 1)
end

function spell4_26727(pUnit, Event) --@Aura of Arcane Haste,Self--
pUnit:FullCastSpellOnTarget(56827,pUnit)
pUnit:RegisterEvent('Sorts_26727', 0, 1)
end

function spell5_26727(pUnit, Event) --@Cone of Cold,Self--
pUnit:FullCastSpellOnTarget(15244,pUnit)
pUnit:RegisterEvent('Sorts_26727', 8340, 1)
end

function spell6_26727(pUnit, Event) --@Cone of Cold,Self--
pUnit:FullCastSpellOnTarget(38384,pUnit)
pUnit:RegisterEvent('Sorts_26727', 8300, 1)
end

function spell7_26727(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(12466,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26727', 3000, 1)
end

function spell8_26727(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(17290,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26727', 3000, 1)
end

function spell9_26727(pUnit, Event) --@Freezing Trap,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(55040,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_26727', 1, 1)
end

function spell10_26727(pUnit, Event) --@Frostbolt,Self--
pUnit:FullCastSpellOnTarget(12737,pUnit)
pUnit:RegisterEvent('Sorts_26727', 7000, 1)
end

function spell11_26727(pUnit, Event) --@Frostbolt,Self--
pUnit:FullCastSpellOnTarget(56837,pUnit)
pUnit:RegisterEvent('Sorts_26727', 7000, 1)
end

function spell12_26727(pUnit, Event) --@Immolation Trap,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(47784,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_26727', 1, 1)
end

function spell13_26727(pUnit, Event) --@Polymorph,n/a--
pUnit:FullCastSpellOnTarget(13323,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26727', 9500, 1)
end

function spell14_26727(pUnit, Event) --@Rain of Fire,n/a--
pUnit:FullCastSpellOnTarget(36808,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26727', 9000, 1)
end

function spell15_26727(pUnit, Event) --@Rain of Fire,n/a--
pUnit:FullCastSpellOnTarget(39376,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26727', 9000, 1)
end

function Sorts_26727(pUnit, Event)
local choix_sorts_26727 = math.random(0, 15)
if choix_sorts_26727 == 0 then
pUnit:RegisterEvent('spell0_26727', 1, 1)
end
if choix_sorts_26727 == 1 then
pUnit:RegisterEvent('spell1_26727', 1, 1)
end
if choix_sorts_26727 == 2 then
pUnit:RegisterEvent('spell2_26727', 1, 1)
end
if choix_sorts_26727 == 3 then
pUnit:RegisterEvent('spell3_26727', 1, 1)
end
if choix_sorts_26727 == 4 then
pUnit:RegisterEvent('spell4_26727', 1, 1)
end
if choix_sorts_26727 == 5 then
pUnit:RegisterEvent('spell5_26727', 1, 1)
end
if choix_sorts_26727 == 6 then
pUnit:RegisterEvent('spell6_26727', 1, 1)
end
if choix_sorts_26727 == 7 then
pUnit:RegisterEvent('spell7_26727', 1, 1)
end
if choix_sorts_26727 == 8 then
pUnit:RegisterEvent('spell8_26727', 1, 1)
end
if choix_sorts_26727 == 9 then
pUnit:RegisterEvent('spell9_26727', 1, 1)
end
if choix_sorts_26727 == 10 then
pUnit:RegisterEvent('spell10_26727', 1, 1)
end
if choix_sorts_26727 == 11 then
pUnit:RegisterEvent('spell11_26727', 1, 1)
end
if choix_sorts_26727 == 12 then
pUnit:RegisterEvent('spell12_26727', 1, 1)
end
if choix_sorts_26727 == 13 then
pUnit:RegisterEvent('spell13_26727', 1, 1)
end
if choix_sorts_26727 == 14 then
pUnit:RegisterEvent('spell14_26727', 1, 1)
end
if choix_sorts_26727 == 15 then
pUnit:RegisterEvent('spell15_26727', 1, 1)
end
end

function mob26727_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26727', math.random(1500, 3000), 1)
end

function mob26727_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26727_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26727_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26727, 1, 'mob26727_Action')
RegisterUnitEvent(26727, 2, 'mob26727_Leave')
RegisterUnitEvent(26727, 3, 'mob26727_Kill')
RegisterUnitEvent(26727, 4, 'mob26727_Die')
